#pragma once
#include "../SGD Wrappers/SGD_AudioManager.h"
#include "../SGD Wrappers/SGD_GraphicsManager.h"
#include "../SGD Wrappers/SGD_Handle.h"	 // HTexture type
#include "../SGD Wrappers/SGD_Geometry.h"
#include "Entity.h"
#include "GameplayState.h"
#include "Player.h"
#include "StaticObject.h"

#include "IEntity.h" // IEntity type

class Animal
{

public:
	Animal(void) = default;


	// Interface:
	//	- virtual functions for children classes to override
	//*******************************************************
	//     COPY PASTE THESE VIRTUALS FOR QUICK INSTANTIATION!!
	virtual void	Update(float elapsedTime) = 0;
	virtual void	Render(void) = 0;
	virtual bool CheckCollision(void) = 0;
	virtual void HandleCollision(const Animal* pOther) = 0;
	virtual void PreformBehavaior(void) = 0;
	virtual void RunAggressive(void) = 0;
	virtual void RunCurious(void) = 0;
	virtual void RunFearful(void) = 0;

	//*******************************************************


//	 int		GetType(void)	const	{ return GameplayState::ANI_BASE; }
	virtual int  GetCondition(void)const { return CurrentCondition; }


	//****************************************************************

	//Accessors
	virtual SGD::HTexture GetImage(void)const { return m_hImage; }
	virtual SGD::Point GetPosition(void)const { return m_ptPosition; }
	virtual SGD::Vector GetVelocity(void)const { return m_vtVelocity; }
	virtual SGD::Size GetObjSize(void)const{ return m_szSize; }
	virtual SGD::Size GetSmellSize(void)const{ return m_szSmellSize; }
	virtual SGD::Size GetHearSize(void)const { return m_szHearSize; }

	virtual float GetRotation(void) const { return m_fRotation; }
	virtual SGD::Rectangle GetHitRect(void) const{ return m_RecHitBox; }
	virtual SGD::Rectangle GetSmellRect(void) const{ return m_RecSmellBox; }
	virtual SGD::Rectangle GetHearRect(void) const{ return m_RecHearBox; }


	//Mutators

	virtual void SetImage(SGD::HTexture _hImage) { m_hImage = _hImage; }
	virtual void SetPosition(SGD::Point _ptPosition) { m_ptPosition = _ptPosition; }

	virtual void SetVelocity(SGD::Vector _vtVelocity) { m_vtVelocity = _vtVelocity; }
	virtual void SetObjSize(SGD::Size _szSize){ m_szSize = _szSize; }
	virtual void SetHearSize(SGD::Size _szHearSize){ m_szHearSize = _szHearSize; }
	virtual void SetSmellSize(SGD::Size _szSmellSize){ m_szSmellSize = _szSmellSize; }
	virtual void SetRotation(float _Rotation) { m_fRotation = _Rotation; }

	virtual void SetHitRec(SGD::Rectangle _HitBox){ m_RecHitBox = _HitBox; }
	virtual void SetSmellRec(SGD::Rectangle _SmellBox){ m_RecSmellBox = _SmellBox; }
	virtual void SetHearRec(SGD::Rectangle _HearBox){ m_RecHearBox = _HearBox; }

	virtual ~Animal(void) = default;


protected:
	int CurrentCondition = 0;


	// members:
	SGD::HTexture m_hImage = SGD::INVALID_HANDLE;	// image handle
	SGD::Point	 m_ptPosition = SGD::Point{ 0, 0 };		// 2D position
	SGD::Vector	 m_vtVelocity = SGD::Vector{ 0, 0 };	// 2D velocity
	SGD::Size	 m_szSize = SGD::Size{ 0, 0 };		// 2D size
	SGD::Size	m_szSmellSize = SGD::Size{ 0, 0 };
	SGD::Size	m_szHearSize = SGD::Size{ 0, 0 };
	SGD::Rectangle m_RecHitBox = SGD::Rectangle(0, 0, 0, 0);
	SGD::Rectangle m_RecSmellBox = SGD::Rectangle(0, 0, 0, 0);
	SGD::Rectangle m_RecHearBox = SGD::Rectangle(0, 0, 0, 0);

	float		 m_fRotation = 0.0f; //In Radians


private:



	//[to be designed class] m_oVisionMatrix;




};

